histNorm<-function (x, main, col)
    {
        par(mfrow=c(1,1))
		h<-hist(x, main=main, col=col)
        xfit<-seq(min(x),max(x),length=40)
        yfit<-dnorm(xfit,mean=mean(x),sd=sd(x))
        yfit <- yfit*diff(h$mids[1:2])*length(x)
        lines(xfit, yfit, col="red", lwd=2)
    }
    
QQNorm<-function (x, main, col)
    {
        par(mfrow=c(1,1))
		qqnorm(x, main=main)
        abline(a=mean(x),b=sd(x), col="red", lwd=2)
    }
    
bothNorm<-function (x, main, col)
    {
        par(mfrow=c(1,2))
        h<-hist(x, main=main, col=col)
        xfit<-seq(min(x),max(x),length=40)
        yfit<-dnorm(xfit,mean=mean(x),sd=sd(x))
        yfit <- yfit*diff(h$mids[1:2])*length(x)
        lines(xfit, yfit, col="red", lwd=2)
        qqnorm(x, main="Q-Q plot")
        abline(a=mean(x),b=sd(x), col="red", lwd=2)
    }
